package com.huazai.bean;

import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;

/**
 * @author EZTTU
 */
public class User implements HttpSessionBindingListener {
    private String name;
    private int id;

    public User() {
    }

    public User(String name, int id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public void valueBound(HttpSessionBindingEvent event) {
        System.out.println("数据绑定了");
    }

    @Override
    public void valueUnbound(HttpSessionBindingEvent event) {
        System.out.println("数据解绑了");
    }
}
